<include file="public@header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:url('Office/personnel')}">人员管理</a></li>
		<li><a href="{:url('Office/add')}">添加人员</a></li>
		<li class="active"><a href="{:url('Office/resetpassword',array('id'=>$id))}">重置密码</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form" action="{:url('Office/resetpasswordpost')}">
		<fieldset>
			<input type="hidden" name="id" value="{$id}">
			<div class="control-group">
				<label class="control-label">新密码</label>
				<div class="controls">
					<input type="password" name="user_pass" id="pwd1" class="form-control" placeholder="" required>
					<span class="form-required">*</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">确认密码</label>
				<div class="controls">
					<input type="password" name="user_pass" id="pwd2" class="form-control" onblur="validate()"  placeholder=""  required>
					<span id="tishi"></span>
					<span class="form-required">*</span>
				</div>
			</div>
		</fieldset>
		<div class="form-actions">
			<button type="submit" class="btn btn-primary js-ajax-submit" id="xiugai" >{:lang('保存')}</button>
		</div>
	</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>

<script>
	function validate() {
		var pwd1 = document.getElementById("pwd1").value;
		var pwd2 = document.getElementById("pwd2").value;
		if(pwd1 == pwd2) {
			document.getElementById("tishi").innerHTML="<font color='green'>两次密码相同</font>";
		}
		else {
			window.alert("两次输入的新密码不一致！");
		}
	}
</script>

</body>
</html>